

<script>
    var AType_list = {
        0:'限时活动[领取记录活动结束后清除]',
        1:'日常活动[活动记录每日清除，隔天达成条件后可以重新领取]',
        2:'福利活动[活动不下架，领取记录终身有效]',
    };

    function afterShowForm(e,isEdit){
        // $("#s_key").attr("title","客户端用的活动标识，用来判断该活动的类型，比如nmrq").tooltip({container:'body'});
        // $("#s_id").attr("title","周期性的活动，这个填入该周期ID,如赛季ID等").tooltip({container:'body'});
        // $("#s_arg1").attr("title","给客户端用的魔法参数1").tooltip({container:'body'});
        // $("#s_arg2").attr("title","给客户端用的魔法参数2").tooltip({container:'body'});
    }

    var NewsColModel = [

        {label: '活动类型', name: 'AType',width: 150, editable: true, sortable:false,hidden:false,resize:false,fixed:true,search:true,
            formatter:'select', edittype:'select', editoptions:{value:AType_list},
            stype:"select",
            searchoptions:{sopt:['eq'],value:AType_list}
        },

        {label: '活动标识', name: 's_key',width: 80, editable: true, sortable:false,hidden:true,resize:true,fixed:false,search:false,editrules: { edithidden: true },},
        {label: '活动模板', name: 's_skin',width: 80, editable: true, sortable:false,hidden:true,resize:true,fixed:false,search:false,
            editrules: { edithidden: true },
        },

        {label: '活动参数', name: 's_arg',width: 80, editable: true, sortable:false,hidden:true,resize:true,fixed:false,search:false,
            editrules: { edithidden: true },
        },
        // {label: '活动说明', name: 'desc',width: 180, editable: true, sortable:false,hidden:false,resize:true,fixed:false,search:false,
        //     editrules: { edithidden: true },
        //     edittype:'textarea',editoptions:{rows:"1",cols:"73"},
        // },
    ];


    var NewNavbar = [
        {
            title:"配置数据",
            caption:"",
            position : "last",
            buttonicon:"octicon-gear",
            onClickButton: function(){
                var id=$(grid_selector).jqGrid("getGridParam","selrow");
                if(!id){
                    return layer.alert('请先选择一行数据');
                }
                var data = $(grid_selector).jqGrid("getRowData",id);
                var name = "配置数据 --> "+data['name'];
                var index = cosjs.layer.show(name,GURL('branch/active','index?pid='+id+'&key=item'));
                layer.full(index);
            }
        }
    ]

</script>

